import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

import { RouterStateService } from '@core/base';
import { Task } from '@core/job/custom.model';
import { CustomService } from '@core/job/custom.service';

@Component({
  selector: 'app-custom-task-manager',
  templateUrl: './custom-task-manager.component.html'
})
export class CustomTaskManagerComponent implements OnInit {
  configId?: string;

  constructor(
    private routerStateSrc: RouterStateService,
    private route: ActivatedRoute,
    private customSrc: CustomService
  ) {}

  ngOnInit(): void {
    this.route.paramMap.subscribe(params => {
      const configId = params.get('configId');
      if (configId) {
        this.configId = configId;
      }
    });
  }

  onBack(): void {
    this.routerStateSrc.back();
  }
}
